From: Jasper St. Pierre Date: Sat, 21 Feb 2015 01:02:56 +0000 (-0800) Subject: st-box-layout: Fix Cogl deprecations X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1690 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8dab692f93522e3adbe3d03e59ddaca5c9a1e6ee;p=gnome-shell.git st-box-layout: Fix Cogl deprecations --- diff --git a/src/st/st-box-layout.c b/src/st/st-box-layout.c index cb4917f20..63e2ff717 100644 --- a/src/st/st-box-layout.c +++ b/src/st/st-box-layout.c @@ -387,19 +387,20 @@ st_box_layout_paint (ClutterActor *actor) ClutterActorBox allocation_box; ClutterActorBox content_box; ClutterActor *child; + CoglFramebuffer *fb = cogl_get_draw_framebuffer (); get_border_paint_offsets (self, &x, &y); if (x != 0 || y != 0) { - cogl_push_matrix (); - cogl_translate ((int)x, (int)y, 0); + cogl_framebuffer_push_matrix (fb); + cogl_framebuffer_translate (fb, (int)x, (int)y, 0); } st_widget_paint_background (ST_WIDGET (actor)); if (x != 0 || y != 0) { - cogl_pop_matrix (); + cogl_framebuffer_pop_matrix (fb); } if (clutter_actor_get_n_children (actor) == 0) @@ -417,10 +418,11 @@ st_box_layout_paint (ClutterActor *actor) * the borders and background stay in place; after drawing the borders and * background, we clip to the content area */ if (priv->hadjustment || priv->vadjustment) - cogl_clip_push_rectangle ((int)content_box.x1, - (int)content_box.y1, - (int)content_box.x2, - (int)content_box.y2); + cogl_framebuffer_push_rectangle_clip (fb, + (int)content_box.x1, + (int)content_box.y1, + (int)content_box.x2, + (int)content_box.y2); for (child = clutter_actor_get_first_child (actor); child != NULL; @@ -428,7 +430,7 @@ st_box_layout_paint (ClutterActor *actor) clutter_actor_paint (child); if (priv->hadjustment || priv->vadjustment) - cogl_clip_pop (); + cogl_framebuffer_pop_clip (fb); } static void @@ -442,19 +444,20 @@ st_box_layout_pick (ClutterActor *actor, ClutterActorBox allocation_box; ClutterActorBox content_box; ClutterActor *child; + CoglFramebuffer *fb = cogl_get_draw_framebuffer (); get_border_paint_offsets (self, &x, &y); if (x != 0 || y != 0) { - cogl_push_matrix (); - cogl_translate ((int)x, (int)y, 0); + cogl_framebuffer_push_matrix (fb); + cogl_framebuffer_translate (fb, (int)x, (int)y, 0); } CLUTTER_ACTOR_CLASS (st_box_layout_parent_class)->pick (actor, color); if (x != 0 || y != 0) { - cogl_pop_matrix (); + cogl_framebuffer_pop_matrix (fb); } if (clutter_actor_get_n_children (actor) == 0) @@ -469,10 +472,11 @@ st_box_layout_pick (ClutterActor *actor, content_box.y2 += y; if (priv->hadjustment || priv->vadjustment) - cogl_clip_push_rectangle ((int)content_box.x1, - (int)content_box.y1, - (int)content_box.x2, - (int)content_box.y2); + cogl_framebuffer_push_rectangle_clip (fb, + (int)content_box.x1, + (int)content_box.y1, + (int)content_box.x2, + (int)content_box.y2); for (child = clutter_actor_get_first_child (actor); child != NULL; @@ -480,7 +484,7 @@ st_box_layout_pick (ClutterActor *actor, clutter_actor_paint (child); if (priv->hadjustment || priv->vadjustment) - cogl_clip_pop (); + cogl_framebuffer_pop_clip (fb); } static gboolean